import React,{Component} from 'react';
import ReactDOM from 'react-dom';
import Layout from "./layouts/index"
import { BrowserRouter, Switch } from 'react-router-dom'

import {ConfigProvider} from "antd"
// 由于 antd 组件的默认文案是英文，所以需要修改为中文
import zhCN from 'antd/lib/locale/zh_CN';
import 'antd/dist/antd.css';
import moment from 'moment';
import 'moment/locale/zh-cn';
moment.locale('zh-cn');

class App extends Component{
  render(){
    return(
      <BrowserRouter basename="/">
        <Switch>
          <Layout></Layout> 
        </Switch>
      </BrowserRouter>
    )
  }
}

ReactDOM.render(
  <ConfigProvider locale={zhCN}>
    <App />
  </ConfigProvider>,
  document.getElementById('root')
);
